package cn.wolfcode.demo.domain;
/*
实体类
 */


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
//Mongodb要操作的表的名字
@Document("userm")
@TableName("user")
public class User {
    //_id自动转换成ObjectId
    @Id
    @TableField(exist = false)
    private String id;
    @TableId(value = "userid",type = IdType.AUTO)
    private Long userid;
    @TableField("username")
    private String username;
    @TableField("password")
    private String password;

}
